home *** CD-ROM | disk | FTP | other *** search
/ Hyper Animation Series: Viper (Limited Edition) / Hyper Animation Series: VIPER (Limited Edition).iso / pc / SYSTEM / class / PowerItemStop.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-08-04  |  1.0 KB  |  27 lines

  1. class PowerItemStop extends ItemAction {
  2.    public PowerItemStop(StgFrame var1) {
  3.       super(var1);
  4.    }
  5.  
  6.    public void action(ItemIndex var1) {
  7.       super.resource.getItem();
  8.       ((StgObjectIndex)var1).movePosition(-65536, 0, 0);
  9.       super.action(var1);
  10.    }
  11.  
  12.    public void hitPlayer(ItemIndex var1, PlayerShipIndex var2) {
  13.       Status var4 = super.resource.getStatus();
  14.       int var3 = var2.getPower();
  15.       if (var3 == 3) {
  16.          ((ItemAction)this).putGetRedItem(var1);
  17.          var4.add(2000);
  18.       } else {
  19.          ((ItemAction)this).putGetPowerItem(var1);
  20.          ++var3;
  21.          var2.setPower(var3);
  22.       }
  23.  
  24.       super.hitPlayer(var1, var2);
  25.    }
  26. }
  27.